import * as nodePath from "path";

export class FilePath {
    public static readonly nodeModule = nodePath;
    constructor() {
    }
    public static toPosix(sysPath: string) {
        return sysPath.replace(/\\{1,2}/g, "/");
    }

    public static join(...pathPieces: string[]) {
        return nodePath.join(...pathPieces);
    }

    public static posixJoin(...pathPieces: string[]) {
        return FilePath.toPosix(FilePath.join(...pathPieces));
    }
}
